package com;

import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.stream.annotation.EnableBinding;
import org.springframework.context.event.ApplicationContextEvent;
import org.springframework.context.event.EventListener;
import org.springframework.core.env.Environment;
import org.springframework.core.env.MutablePropertySources;
import org.springframework.core.env.StandardEnvironment;
import utils.Utils;

@SpringBootApplication
public class SpringBootAppsForRouteConsumer {
    //
    @EventListener(classes = ApplicationContextEvent.class)
    public void getInfo(ApplicationContextEvent applicationContextEvent){
        StandardEnvironment environment = (StandardEnvironment)applicationContextEvent.getApplicationContext().getEnvironment();
        MutablePropertySources propertySources = environment.getPropertySources();
        System.out.println(propertySources);

    }
}
